package f.h.dragon.filter;

/**
 * FilterChain: FilterChain use the filter to invoke the next
 * filter in the chain, or if the calling filter is the last filter in the
 * chain, to invoke the resource at the end of the chain.
 *
 * @author Wenlong Meng(wenlong.meng@gmail.com)
 * @version 1.0 at 2012/04/01
 * @since 1.0
 * @param <V>
 * @param <R>
 */
public interface FilterChain<V, R> {

	/**
	 * Causes the next filter in the chain to be invoked, or if the calling
	 * filter is the last filter in the chain, causes the resource at the end of
	 * the chain to be invoked.
	 * 
	 * @param v
	 * @return R
	 */
	public R doFilter(V v);

}
